import request from '@/utils/request'

// 查看隐患分类
export function queryHiddenTrouble(data) {
    return request({
        url: '/hidden_trouble/type/',
        method: 'get',
        data: data
    })
}

// 创建隐患分类
export function createHiddenTrouble(data) {
    return request({
        url: '/hidden_trouble/type/',
        method: 'post',
        data: data
    })
}

// 修改隐患分类
export function updateHiddenTrouble(data) {
    return request({
        url: `/hidden_trouble/type/${data.id}/`,
        method: 'put',
        data: data
    })
}

// 删除隐患分类
export function delHiddenTrouble(id) {
    return request({
        url: `/hidden_trouble/type/${id}`,
        method: 'delete',
    })
}